﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Xejen.Ipc.Framework.Flows
{
    /// <summary>
    /// 表示流程事件参数
    /// </summary>
    /// <typeparam name="TData"><inheritdoc cref="IFlow{TData}" path="/typeparam[@name='TData']"/></typeparam>
    /// <creator>marc</creator>
    public class FlowEventArgs<TData> : EventArgs
        where TData : new()
    {
        /// <inheritdoc cref="IFlowInstance"/>
        public IFlowInstance Flow { get; set; }

        /// <summary>
        /// <inheritdoc cref="FlowEventArgs{TData}"/>
        /// </summary>
        /// <param name="flow"><inheritdoc cref="IFlow{TData}" path="/summary"/></param>
        public FlowEventArgs(IFlowInstance flow)
        {
            Check.NotNull(flow, nameof(flow));

            Flow = flow;
        }
    }
}
